<?php

namespace Biz\Constants\Pay;

/**
 * AppConstants.
 *
 * @license [http://www.85do.com] [杭州永奥网络科技有限公司]
 * @copyright Copyright (c) 2018-2026 Hangzhou Yongao Technology Co., Ltd. All rights reserved.
 */
class PayConstants
{
    /**
     * Types.
     */
    const TYPE_WEB_SITE = 'WEB_SITE';

    /**
     * Names.
     *
     * @var array
     */
    public static $TypeNames = [
        self::TYPE_WEB_SITE => '网站',
    ];

    /**
     * Gateway.
     */
    const GATEWAY_PAY_EASE    = 'PAY_EASE';
    const GATEWAY_ALI_PAY     = 'ALI_PAY';
    const GATEWAY_WE_CHAT_PAY = 'WE_CHAT_PAY';

    /**
     * Gateway Names.
     *
     * @var array
     */
    public static $Gateways = [
        self::GATEWAY_PAY_EASE,
        self::GATEWAY_ALI_PAY,
        self::GATEWAY_WE_CHAT_PAY,
    ];

    /**
     * Gateway Names.
     *
     * @var array
     */
    public static $GatewayNames = [
        self::GATEWAY_PAY_EASE    => '首信易支付',
        self::GATEWAY_ALI_PAY     => '支付宝',
        self::GATEWAY_WE_CHAT_PAY => '微信',
    ];

    /**
     * Drivers.
     *
     * @see https://www.beijing.com.cn/
     * @see https://github.com/lokielse/omnipay-alipay
     * @see https://github.com/lokielse/omnipay-wechatpay
     */
    const DRIVER_PAY_EASE_APPLE_PAY       = 'APPLE_PAY';
    const DRIVER_PAY_EASE_ACCOUNT_PAY     = 'ACCOUNT_PAY';
    const DRIVER_PAY_EASE_ONLINE_PAY      = 'ONLINE_PAY';
    const DRIVER_PAY_EASE_VOICE_PAY       = 'VOICE_PAY';
    const DRIVER_PAY_EASE_MOBILE_PAY      = 'MOBILE_PAY';
    const DRIVER_PAY_EASE_CREDIT_CARD_PAY = 'CREDIT_CARD_PAY';

    const DRIVER_ALI_PAY_AOP_PAGE       = 'APO_PAGE';
    const DRIVER_ALI_PAY_AOP_APP        = 'AOP_APP';
    const DRIVER_ALI_PAY_AOP_F2F        = 'AOP_F2F';
    const DRIVER_ALI_PAY_AOP_WAP        = 'AOP_WAP';
    const DRIVER_ALI_PAY_AOP_JS         = 'AOP_JS';
    const DRIVER_ALI_PAY_LEGACY_APP     = 'LEGACY_APP';
    const DRIVER_ALI_PAY_LEGACY_EXPRESS = 'LEGACY_EXPRESS';
    const DRIVER_ALI_PAY_LEGACY_WAP     = 'LEGACY_WAP';

    const DRIVER_WE_CHAT_PAY        = 'WE_CHAT_PAY';
    const DRIVER_WE_CHAT_PAY_APP    = 'WE_CHAT_PAY_APP';
    const DRIVER_WE_CHAT_PAY_NATIVE = 'WE_CHAT_PAY_NATIVE';
    const DRIVER_WE_CHAT_PAY_JS     = 'WE_CHAT_PAY_JS';
    const DRIVER_WE_CHAT_PAY_POS    = 'WE_CHAT_PAY_POS';
    const DRIVER_WE_CHAT_PAY_M_WEB  = 'WE_CHAT_PAY_M_WEB';

    /**
     * Gateway Names.
     *
     * @var array
     */
    public static $DriverNames = [
        /*
         * PayEase
         */
        self::DRIVER_PAY_EASE_APPLE_PAY       => 'Apple Pay',
        self::DRIVER_PAY_EASE_ACCOUNT_PAY     => '账户支付',
        self::DRIVER_PAY_EASE_ONLINE_PAY      => '网上支付',
        self::DRIVER_PAY_EASE_VOICE_PAY       => '语音支付',
        self::DRIVER_PAY_EASE_MOBILE_PAY      => '移动支付',
        self::DRIVER_PAY_EASE_CREDIT_CARD_PAY => '国际信用卡支付',

        /*
         * AliPay
         */
        self::DRIVER_ALI_PAY_AOP_PAGE       => '电脑网站支付',
        self::DRIVER_ALI_PAY_AOP_APP        => 'APP支付',
        self::DRIVER_ALI_PAY_AOP_F2F        => '当面付',
        self::DRIVER_ALI_PAY_AOP_WAP        => '手机网站支付',
        self::DRIVER_ALI_PAY_AOP_JS         => 'JS-API',
        self::DRIVER_ALI_PAY_LEGACY_APP     => 'APP支付',
        self::DRIVER_ALI_PAY_LEGACY_EXPRESS => '即时到账',
        self::DRIVER_ALI_PAY_LEGACY_WAP     => '手机网站支付',
        /*
         * WeChatPay
         */
        self::DRIVER_WE_CHAT_PAY        => '微信支付通用网关',
        self::DRIVER_WE_CHAT_PAY_APP    => '微信APP支付网关',
        self::DRIVER_WE_CHAT_PAY_NATIVE => '微信原生扫码支付支付网关',
        self::DRIVER_WE_CHAT_PAY_JS     => '微信网页、公众号、小程序支付网关',
        self::DRIVER_WE_CHAT_PAY_POS    => '微信刷卡支付网关',
        self::DRIVER_WE_CHAT_PAY_M_WEB  => '微信H5支付网关',
    ];

    /**
     * 应用的几种状态
     */
    const STATUS_REVIEW       = -2; //审核中
    const STATUS_PASSED       = -1; //审核通过
    const STATUS_DEVELOPMENT  = 0; //开发中
    const STATUS_NORMAL       = 1; //正常（上线）

    /**
     * Names.
     *
     * @var array
     */
    public static $StatusNames = [
        self::STATUS_REVIEW       => '审核中',
        self::STATUS_PASSED       => '审核通过',
        self::STATUS_DEVELOPMENT  => '开发中',
        self::STATUS_NORMAL       => '正常',
    ];
}
